<?php

/**
 * Created by Reliese Model.
 */

namespace App\Models;

use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;

/**
 * Class OaModelBranch
 * 
 * @property int $id
 * @property int|null $oa_model_id
 * @property int|null $branch_id
 * @property Carbon|null $create_time
 * @property Carbon|null $update_time
 * 
 * @property Branch|null $branch
 * @property OaModel|null $oa_model
 *
 * @package App\Models
 */
class OaModelBranch extends Model
{
    protected $table = 'oa_model_branch';

    protected $casts = [
        'oa_model_id' => 'int',
        'branch_id' => 'int'
    ];

    protected $fillable = [
        'oa_model_id',
        'branch_id'
    ];

    public function branch()
    {
        return $this->belongsTo(Branch::class);
    }

    public function oa_model()
    {
        return $this->belongsTo(OaModel::class);
    }
}
